//
//  UIImage+GradientColor.h
//  VSSL
//
//  Created by Ares on 5/14/15.
//  Copyright (c) 2015 Ares. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>

typedef enum {
    topToBottom = 0,//从上到小
    leftToRight = 1,//从左到右
    upleftTolowRight = 2,//左上到右下
    uprightTolowLeft = 3,//右上到左下
} GradientType;

@interface UIImage (GradientColor)

+ (UIImage *)imageFromColors:(NSArray *)colors byGradientType:(GradientType)gradientType withSize:(CGSize)size;
+ (UIImage *)maskImage:(UIImage *)originImage toPath:(UIBezierPath *)path;

@end
